<template>
  <div style="margin-bottom: 15px">
    <el-input
      v-model="value"
      size="large"
      placeholder="请输入内容"
      class="input-with-select"
    >
      <el-button slot="append" icon="el-icon-search" @click.native="$emit('Search',value)" />
    </el-input>
    <el-button v-if="btnShow" type="primary" @click="$emit('btn-click')">{{ btnName }}</el-button>
  </div>
</template>

<script>
export default {
  name: 'HeaderSearch',
  props: {
    btnName: {
      type: String,
      default: ''
    },
    btnShow: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      value: ''
    }
  }
}
</script>

<style scoped>
.el-input-group{
  width: 33%;
  margin-right: 30px;
}
</style>
